#include<iostream>
#include<cmath>
using namespace std;
bool fun(int n)
{
	for (int i = 2; i * i <= n; i++) {
		if (n % i == 0) {
			return 0;
		}
	}
	return 1;
}
int main()
{
	int count = 0;
	for (int i = 2; i <= 100; i++) {
		if (fun(i)) {
			count++;
			cout << i << " ";
		}
	}
	cout << endl;
	cout << count << endl;
	return 0;
}